package com.magold.game.factory;

import com.magold.io.XMLReader;
import com.magold.logic.ISpriteLogic;
import com.magold.logic.region.airflow.AirflowRegion;

public class AirflowRegionFactory extends BaseLogicFactory {

	public AirflowRegionFactory() {
		super(AirflowRegion.class.getSimpleName());
	}

	@Override
	protected ISpriteLogic createSafely(XMLReader pReader) {
		float width = pReader.getFloat("width");
		float height = pReader.getFloat("height");
		float windSpeed = pReader.getFloat("wind_speed");

		return new AirflowRegion(width, height, windSpeed);
	}

}
